package com.google.code.UtopiaXml;

/**
 * Common interface for xs:simpleTypes
 *
 * @author Michael Simacek
 */
public interface SimpleType extends Type {

    /**
     * Append block of code that is supposed to parse given String into
     * corresponding object
     *
     * @param cb CodeBuilder to append code to
     * @param string name of the parsed String, or a method call that returns
     * that String
     * @param resName resulting object name. The result object will be declared
     * by this code
     */
    void appendLoaderFromString(CodeBuilder cb, String string, String resName);

    /**
     * Makes a deep copy of this type
     *
     * @return deep copy
     */
    SimpleType copy();
}
